
package model.persistence;

import java.sql.SQLException;

public interface TransactionManager {

    public void connect() throws ClassNotFoundException, SQLException;

    public void disconnect() throws SQLException;

    public boolean isConnected();

    public void commit() throws SQLException;

    public void rollback() throws SQLException;

    public Object insert(String entity, Object dto) throws SQLException;

    public Object update(String entity, Object dto) throws SQLException;

    public void delete(String entity, Object dto) throws SQLException;

    public Object find(String entity, Object oid) throws SQLException;

    public DAO getDAO(String entity) throws CloneNotSupportedException, InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException;
}
